package com.lzq.rabbitmqdemo.java_api.constant;

import com.rabbitmq.client.ConnectionFactory;

public class ConnectionConfig {
    public static ConnectionFactory factory;
    private ConnectionConfig() {

    }
    public static ConnectionFactory getFactory() {
        factory = new ConnectionFactory();
        factory.setHost(Constants.HOST);
        factory.setPort(Constants.PORT);
        factory.setUsername(Constants.USER_NAME);
        factory.setPassword(Constants.PASSWORD);
        factory.setVirtualHost(Constants.VIRTUAL_HOST);
        return factory;
    }
}
